module.exports = app => {
    const mongoose = app.mongoose;
    const OauthScheam = new mongoose.Schema({
        accessToken: String,
        accessTokenExpiresAt: Date,
        refreshToken: String,
        refreshTokenExpiresAt: Date,
        scope: String,
        user:{
            id: String
        }
    },
        { collection: 'oauth' })

    return mongoose.model('Oauth', OauthScheam);
}